import fetch from 'common/src/utils/fetch';
import baseUrl from './env';
// 新增申请补办时间
function saveReapplyTime(data) {
  return fetch({
      url: `${baseUrl}/reapplyTime/saveReapplyTime`,
      method: 'post',
      data
  });
}
// 更新申请补办时间
function updateReapplyTime(data) {
  return fetch({
      url: `${baseUrl}/reapplyTime/updateReapplyTime`,
      method: 'post',
      data
  });
}
// 删除申请补办时间
function removeReapplyTime(data) {
    return fetch({
        url: `${baseUrl}/reapplyTime/removeReapplyTime`,
        method: 'post',
        data
    });
  }
// 查询申请补办时间
function listReapplyTime(data) {
    return fetch({
        url: `${baseUrl}/reapplyTime/listReapplyTime`,
        method: 'post',
        data
    });
  }
// 申请补办列表
function assignPerson(data) {
    return fetch({
        url: `${baseUrl}/balance/activityInfo/assignPerson`,
        method: 'post',
        data
    });
  }
  // 导出申请列表
function downloadExcel(data) {
    return fetch({
        url: `${baseUrl}/reapplyStudent/downExcel`,
        method: 'post',
        data
    });
  }
  // 申请时间展示
function showTime(data) {
    return fetch({
        url: `${baseUrl}/reapplyStudent/showTime`,
        method: 'post',
        data
    });
  }
  // 学生取消补办
function cancelCard(data) {
    return fetch({
        url: `${baseUrl}/reapplyStudent/cancelCard`,
        method: 'post',
        data
    });
  }
  // 发放学生证
function grantCard(data) {
    return fetch({
        url: `${baseUrl}/reapplyStudent/grantCard`,
        method: 'post',
        data
    });
  }
  // 学生申请补办
function saveReapplyStudent() {
    return fetch({
        url: `${baseUrl}/reapplyStudent/saveReapplyStudent`,
        method: 'post'
    });
  }
  // 拒绝学生申请补办
function refuseStudentapply(data) {
  return fetch({
      url: `${baseUrl}/reapplyStudent/refuse`,
      method: 'post',
      data
  });
}
  // 学生申请补办列表
function reapplyStudentlist(data) {
  return fetch({
      url: `${baseUrl}/reapplyStudent/getList`,
      method: 'post',
      data
  });
}
  /**
 * 获取key
 */
function exportStatus(key) {
  return fetch({
      url: `${baseUrl}/export/result/${key}`,
      method: 'get'
  });
}
const premissioncardApi = {
  saveReapplyTime,
  updateReapplyTime,
  removeReapplyTime,
  listReapplyTime,
  assignPerson,
  downloadExcel,
  showTime,
  cancelCard,
  grantCard,
  saveReapplyStudent,
  exportStatus,
  reapplyStudentlist,
  refuseStudentapply
}
export default premissioncardApi;
